home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pSolidArrow, pHilightArrow, pLastChar
- global gScroller, gLastLetter
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pSolidArrow = sprite(me.spriteNum + 1)
- pHilightArrow = sprite(me.spriteNum + 2)
- if voidp(gLastLetter) then
- setIt(me, 1)
- else
- setIt(me, gLastLetter)
- end if
- mouseLeave(me)
- end
-
- on mouseDown me
- setIt(me, PointToChar(pSpr, the clickLoc))
- gScroller.pLastLine = VOID
- end
-
- on mouseLeave me
- pHilightArrow.locH = -50
- end
-
- on mouseWithin me
- if paused() then
- exit
- end if
- thisChar = PointToChar(pSpr, the mouseLoc)
- if thisChar > 0 then
- pHilightArrow.locH = pSpr.locH + charPosToLoc(pSpr.member, thisChar).locH
- if thisChar <> pLastChar then
- if pLastChar then
- pSpr.member.char[pLastChar].color = black()
- end if
- pSpr.member.char[thisChar].color = red()
- pSpr.member.char[gLastLetter].color = blue()
- pLastChar = thisChar
- end if
- end if
- end
-
- on setIt me, X
- if paused() then
- exit
- end if
- if not isText(pSpr) then
- exit
- end if
- gLastLetter = X
- pSolidArrow.locH = pSpr.locH + charPosToLoc(pSpr.member, X).locH
- pSpr.member.color = black()
- if hasRecipes(pSpr.member.text.char[X]) then
- pSpr.member.char[X].color = blue()
- else
- pSpr.member.char[X].color = red()
- end if
- cursor(4)
- pageSound()
- updateStage()
- activeRecipes = sendSprite(gScroller, #mRefresh, X, pSpr.member.char[X])
- cursor(-1)
- end
-